package com.looeyWei;

import javax.swing.*;
import java.awt.*;

public class MyFrame extends JFrame {

    /**
     * 自定义控件
     */
    HandDraw handDraw = new HandDraw();

    public MyFrame(String title) {
        super(title);

        //
        JPanel rootPanel = new JPanel();
        rootPanel.setLayout(new BorderLayout());
        this.setContentPane(rootPanel);

        //
        rootPanel.add(handDraw, BorderLayout.CENTER);
    }

    /**
     *  窗口显示设置 封装
     */
    public void exec(){
        //
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.setSize(1000, 800);
        this.setLocationRelativeTo(null);

        //
        this.setVisible(true);
    }

}